//=======================================================
// File		:	CGameClass.h
// Author	:	Mike Pedro
// Date		:   1/25/08
//
// Purpose	:	Our single instance of our game containing initaliazation, 
//					updating, Drawing, and cleaning up memory.
//=======================================================

#pragma once
#include "CD3DWrapper.h"
#include "CCamera.h"
#include "CTerrain.h"
#include "CModelManager.h"

class CGameClass
{
	CD3DWrapper*			m_pDirect3D;			// Pointer to our Direct3D Wrapper.
	CCamera*					m_pCamera;
	CTerrain*					m_pTerrain;
	CModelManager*		m_pModelManager;

	float							m_fRightClickx;
	float							m_fRightClicky;
	float							m_fMouseAngleYaw;
	float							m_fMouseAnglePitch;
	float							m_fScaleScreenX;
	float							m_fScaleScreenY;

	bool							m_bRightButtonClick;


	int							nDrone;
	D3DXVECTOR3          m_ObjectPos;

protected:
	CGameClass(void);
	CGameClass(const CGameClass&);
	CGameClass& operator=(const CGameClass&);
	~CGameClass(void);

public:

	//=====================================================
	// Function	:	GetInstance()
	//
	// Out		:	CGameClass& - Handle to our single game class instance
	//
	//	Purpose	:	To return a reference to our Game Class Instance
	//=====================================================
	static CGameClass* GetInstance(void);

	//=====================================================
	// Function	:	Initialize()
	//
	// Out		:	bool - Did we Initialize successfully? If so return true.
	//
	//	Purpose	:	Contain all initialization for our game, D3D, sound, textures.. etc.
	//=====================================================
	bool Initialize(int nScreenWidth, int nScreenHeight, HWND hWnd);

	//=====================================================
	// Function	:	Draw()
	//
	// Out		:	bool - Did we Draw successfully? If so return true.
	//
	//	Purpose	:	Display our game to the screen
	//=====================================================
	bool Draw(float fElapsedTime);

	//=====================================================
	// Function	:	Update()
	//
	// Out		:	bool - Did we update successfully? If so return true.
	//
	//	Purpose	:	Update Game logic, character positions, objects... etc.
	//=====================================================
	bool Update(float fElapsedTime);

	void OnRightMouseClick(float x, float y);
	void OnMouseMove(float x, float y);
	

	//=====================================================
	// Function	:	CleanUp()
	//
	//	Purpose	:	Clean up all of our dynamic memory and COM objects
	//=====================================================
	void CleanUp(void);
};
